

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Installation of PYME on windows with Enthought python &mdash; PYME 0.1 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="PYME 0.1 documentation" href="../index.html" />
    <link rel="next" title="Installation From Source" href="InstallationFromSource.html" />
    <link rel="prev" title="PYME’s Documentation" href="../index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="InstallationFromSource.html" title="Installation From Source"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../index.html" title="PYME’s Documentation"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">PYME 0.1 documentation</a> &raquo;</li>
<li><a href="http://lmsrv1/docwiki/docs/pyme-docs/Installation/InstallationUsingWindowsInstaller.rst">Edit</a> &raquo;</li>
 

      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="installation-of-pyme-on-windows-with-enthought-python">
<span id="installationwindowsepd"></span><h1>Installation of PYME on windows with Enthought python<a class="headerlink" href="#installation-of-pyme-on-windows-with-enthought-python" title="Permalink to this headline">¶</a></h1>
<div class="section" id="step-1-installing-epd">
<h2>STEP 1: Installing EPD<a class="headerlink" href="#step-1-installing-epd" title="Permalink to this headline">¶</a></h2>
<p>PYME requires python (ideally version 2.7) and a number of additional packages.
The easiest way to get a system up and running is to install the
<a class="reference external" href="http://www.enthought.com/products/epd.php">Enthought Python Distribution</a> (EPD)
which is free for academic use. This has most of the required dependencies, although
a couple will still need to be installed manually. These instructions are based on EPD 7.1.2, which
ships with python 2.7, other versions of EPD might work, but a change in the
underlying python version will need a new installer.</p>
<p>Both 32 bit and 64 bit versions
are available and PYME works with either. If you want to access hardware (e.g. cameras)
and are running 64 bit windows you might need the 64 bit version (I&#8217;ve only tested it
with the 64 bit version). If given the option chose &#8216;install for everyone / all users&#8217;,
rather than doing a personal install. Under Win7/Vista? you might need to right click the EPD
installer and select &#8216;run as administrator&#8217; to do an install for everyone.</p>
</div>
<div class="section" id="step-2-installing-pyme-using-the-installer">
<h2>STEP 2: Installing PYME using the installer<a class="headerlink" href="#step-2-installing-pyme-using-the-installer" title="Permalink to this headline">¶</a></h2>
<p>This should be as simple as running the installer which is appropriate to your
version of EPD. ie <tt class="docutils literal"><span class="pre">PYME-X.X.X.win32-py2.7.exe</span></tt> for 32 bit EPD and
<tt class="docutils literal"><span class="pre">PYME-X.X.X.win-amd64-py2.7.exe</span></tt> for 64 bit EPD. The installers are available
from <a class="reference external" href="http://code.google.com/p/python-microscopy/downloads/list">http://code.google.com/p/python-microscopy/downloads/list</a>
The installer will also attempt to download and install Pyro, a required dependency,
for you as well. Automatically installing Pyro will only work if the computer that
you are installing on
has an internet connection, otherwise see specific instructions below.</p>
</div>
<div class="section" id="step-3-upgrading-wxpython">
<h2>STEP 3: Upgrading wxPython<a class="headerlink" href="#step-3-upgrading-wxpython" title="Permalink to this headline">¶</a></h2>
<p>PYME needs wxPython &gt;= 2.8.11. EPD comes with an
older version of wx and we need to remove this before installing the up to date one.
When you install PYME, it installs a script (<tt class="docutils literal"><span class="pre">remove_old_wx.py</span></tt>) to help with
the messy removal part of the process:</p>
<ul class="simple">
<li>Open a command prompt (start menu, run, cmd)</li>
<li>type <tt class="docutils literal"><span class="pre">remove_old_wx.py</span></tt> and hit enter</li>
<li>install the new wx which you can download from <a class="reference external" href="http://www.wxpython.org/download.php">http://www.wxpython.org/download.php.</a>
Grab the unicode version which matches your python version (python version number and 32 / 64 bits).</li>
</ul>
<p>At this stage you should have a working basic installation.</p>
</div>
<div class="section" id="step-4-other-dependencies-mostly-optional">
<h2>STEP 4: Other Dependencies (mostly optional)<a class="headerlink" href="#step-4-other-dependencies-mostly-optional" title="Permalink to this headline">¶</a></h2>
<p>In addition to those provided with EPD and which EPD, PYME can make use of a few
additional packages which need to be manually installed. Luckily Python comes with a package manager called <tt class="docutils literal"><span class="pre">pip</span></tt>
(or alternatively a slightly older one called <tt class="docutils literal"><span class="pre">easy_install</span></tt> if you don&#8217;t have pip on
your system) which makes this relatively easy if the computer you are using has an
internet connection.</p>
<p>To use <tt class="docutils literal"><span class="pre">pip</span></tt>, open a command prompt and type:</p>
<div class="highlight-python"><pre>pip install &lt;module name&gt;</pre>
</div>
<p>alternatively, using <tt class="docutils literal"><span class="pre">easy_install</span></tt>:</p>
<div class="highlight-python"><pre>easy_install &lt;module name&gt;</pre>
</div>
<p>If you don&#8217;t have an internet connection on the computer you&#8217;re trying to install on,
you&#8217;ll have to grab the installers seperately for each module you need. Here google is
your friend and googling &#8220;python &lt;module name&gt;&#8221; will usually get you there pretty quickly.
Once you have an installer, just double click on it to install the module.</p>
<div class="section" id="a-pyro">
<h3>4a: Pyro<a class="headerlink" href="#a-pyro" title="Permalink to this headline">¶</a></h3>
<p>This is required and should have been installed by the PYME installer.
If this didn&#8217;t work, try installing manually by entering:</p>
<div class="highlight-python"><pre>easy_install Pyro</pre>
</div>
<p>at the command prompt. If you don&#8217;t have internet access you&#8217;ll need to download
it from <a class="reference external" href="http://pypi.python.org/pypi/Pyro/">http://pypi.python.org/pypi/Pyro/</a>
, unzip, change to the relevant directory, and run:</p>
<div class="highlight-python"><pre>python setup.py install</pre>
</div>
<p>More information can be found at <a class="reference external" href="http://www.xs4all.nl/~irmen/pyro3/">http://www.xs4all.nl/~irmen/pyro3/</a>.
Notably this should be one of the 3.X versions rather than the recently released
Pyro4.</p>
<p>You can test that Pyro is installed and functioning by typing:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">pyro</span><span class="o">-</span><span class="n">ns</span> <span class="o">-</span><span class="n">h</span>
</pre></div>
</div>
<p>at the command prompt - you should get usage information for the pyro nameserver.</p>
</div>
<div class="section" id="b-extras">
<h3>4b: Extras<a class="headerlink" href="#b-extras" title="Permalink to this headline">¶</a></h3>
<p>None of these are required for core functionality, so are probably best deferred
until you are sure you want/need that feature:</p>
<ul class="simple">
<li>PyFFTW3 (widefield/confocal deconvolution - This can be a bit tricky on windows as
you have to seperately download and install the fftw3 libraries. I have a
pre-canned installer which also installs the libraries that I can give you on request.)</li>
<li>PySerial (interfacing some hardware)</li>
<li>PyParallel (ditto)</li>
<li>MySQL-python (needed for Django and sample database)</li>
<li>Django (&gt;1.2) (sample database)</li>
<li>Django-south</li>
<li>Delny  (triangle based segmentation)</li>
</ul>
<p>It&#8217;s possible that I&#8217;ve also forgotten something, so if PYME complains that it can&#8217;t
find a module, try <a href="#id1"><span class="problematic" id="id2">``</span></a>pip install``ing it.</p>
</div>
</div>
<div class="section" id="step-5-configuration">
<h2>STEP 5: Configuration<a class="headerlink" href="#step-5-configuration" title="Permalink to this headline">¶</a></h2>
<div class="section" id="basic-configuration">
<span id="basicconfig"></span><h3>Basic Configuration<a class="headerlink" href="#basic-configuration" title="Permalink to this headline">¶</a></h3>
<p>In addition to the setup detailed above, PYME has a couple of configuration options
which are controlled by environment variables. These are:</p>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>PYMEDATADIR</td>
<td>Default location where PYMEAcquire saves data. Eg
<tt class="docutils literal"><span class="pre">D:\</span></tt>. Also place where other parts of analysis
chain look for data.</td>
</tr>
<tr class="row-even"><td>PYMEMICRPATH</td>
<td>Used with sample database to know where (on the local
machine) the microscope computer is mapped. Not relevant
unless you&#8217;re using the sample information database.</td>
</tr>
<tr class="row-odd"><td>PYMENASPATH</td>
<td>As for PYMEMICRPATH, but for the NAS</td>
</tr>
</tbody>
</table>
<p>You probably want to set PYMEDATADIR, as the default is not
particularly useful. Environment variables can be set by right clicking on
<cite>My Computer</cite> selecting <cite>Properties</cite> and then <cite>Advanced System Settings</cite>.</p>
<p>You should now have a setup which works for simulation*,
data analysis, &amp; visualisation. Interfacing with hardware
requires a little more work - see <a class="reference internal" href="../ConfiguringPYMEAcquire.html#configuringpymeacquire"><em>Configuring PYME Acquire</em></a>.</p>
<p>* simulation probably won&#8217;t work perfectly until you&#8217;ve done the
EMGain calibration section of <a class="reference internal" href="../ConfiguringPYMEAcquire.html#configuringpymeacquire"><em>Configuring PYME Acquire</em></a>.</p>
</div>
<div class="section" id="pyro-nameserver">
<h3>Pyro Nameserver<a class="headerlink" href="#pyro-nameserver" title="Permalink to this headline">¶</a></h3>
<p>You need to run a <a class="reference external" href="http://www.xs4all.nl/~irmen/pyro3/">Pyro</a> nameserver somewhere
on your network segment. For testing, the easiest thing is to let PYME launch one for you.</p>
<p>There can, however, only be one nameserver on the network segment and once you start
running PYME on multiple machines a somewhat more sophisticated solution is needed.
The nameserver can be started seperately from PYME by running <tt class="docutils literal"><span class="pre">pryo_ns</span></tt>
(or <tt class="docutils literal"><span class="pre">pyro-nsd</span></tt>) from the command line and my recommendation is to find a machine
which is always on (e.g. a server) and run it on that. Several linux distributions
have packages for Pyro which set the nameserver up as a service, although there might be some
trickery involved to make sure it binds to the the external interface rather
than localhost (specifically, the hostname has to resolve to the external interface).</p>
</div>
</div>
<div class="section" id="step-6-testing">
<h2>STEP 6: Testing<a class="headerlink" href="#step-6-testing" title="Permalink to this headline">¶</a></h2>
<p>The installer should have added a <tt class="docutils literal"><span class="pre">PYME</span></tt> folder to the start menu and each of the scripts
should launch some form of GUI - see the main documentaion for more details.</p>
<p>TODO - expand this with a few simple tests and example data.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Installation of PYME on windows with Enthought python</a><ul>
<li><a class="reference internal" href="#step-1-installing-epd">STEP 1: Installing EPD</a></li>
<li><a class="reference internal" href="#step-2-installing-pyme-using-the-installer">STEP 2: Installing PYME using the installer</a></li>
<li><a class="reference internal" href="#step-3-upgrading-wxpython">STEP 3: Upgrading wxPython</a></li>
<li><a class="reference internal" href="#step-4-other-dependencies-mostly-optional">STEP 4: Other Dependencies (mostly optional)</a><ul>
<li><a class="reference internal" href="#a-pyro">4a: Pyro</a></li>
<li><a class="reference internal" href="#b-extras">4b: Extras</a></li>
</ul>
</li>
<li><a class="reference internal" href="#step-5-configuration">STEP 5: Configuration</a><ul>
<li><a class="reference internal" href="#basic-configuration">Basic Configuration</a></li>
<li><a class="reference internal" href="#pyro-nameserver">Pyro Nameserver</a></li>
</ul>
</li>
<li><a class="reference internal" href="#step-6-testing">STEP 6: Testing</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="../index.html"
                        title="previous chapter">PYME&#8217;s Documentation</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="InstallationFromSource.html"
                        title="next chapter">Installation From Source</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/Installation/InstallationUsingWindowsInstaller.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="InstallationFromSource.html" title="Installation From Source"
             >next</a> |</li>
        <li class="right" >
          <a href="../index.html" title="PYME’s Documentation"
             >previous</a> |</li>
        <li><a href="../index.html">PYME 0.1 documentation</a> &raquo;</li>
<li><a href="http://lmsrv1/docwiki/docs/pyme-docs/Installation/InstallationUsingWindowsInstaller.rst">Edit</a> &raquo;</li>
 

      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, David Baddeley.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>